<!DOCTYPE html>
<html  xmlns:th="http://www.thymeleaf.org"
       xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:include="layout :: htmlhead" th:with="title='管理'"></head>
<script src="/kindeditor/kindeditor-all.js"></script>
<script>
    window.onload = function()
    {

    };

    KindEditor.options.filterMode = false;
    var options = {
        resizeType: 1,
        allowPreviewEmoticons: false,
        allowImageUpload: false,
        afterBlur: function(){this.sync();},
        items : [
            'source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template', 'cut', 'copy', 'paste',
            'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
            'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
            'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',
            'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
            'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image',
            'table', 'hr', 'emoticons', 'baidumap', 'pagebreak',
            'anchor', 'link', 'unlink', '|'],
    };
    var editor = new Array();
    KindEditor.ready(function(K) {
        editor[0] = K.create("#content",options);
    });
</script>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <!--头-->
    <div th:replace="fragments/head :: header">    </div>
    <div class="layui-body" style="margin: 1%">
        <form method="post" action="temp/setTemp" id="tempForm" class="layui-form layui-form-pane">
            <input type="hidden"  name="tempId" id="tempId" th:value="${tempid}">
            <div class="layui-form-item">
                <label class="layui-form-label">模板标题：</label>
                <div class="layui-input-inline">
                    <textarea id="tempTitle" name="tempTitle" lay-verify="required" autocomplete="off" class="layui-input" type="text" th:text="${tempTitle}">
                    </textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">排序：</label>
                <div class="layui-input-inline">
                    <input id="sort" name="sort" lay-verify="required" autocomplete="off" class="layui-input" type="number" th:value="${sort}">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label"> 模板内容：</label>
            </div>
            <div class="layui-form-item">
              <textarea name="content" id="content" th:text="${content}" style="height:550px;width:100%;"></textarea>
            </div>
            <div class="layui-form-item">
                 <input type="button" class="layui-btn" value="提交" onclick="formSubmit()">
            </div>
        </form>
    </div>
    <!--底部-->
    <div th:replace="fragments/footer :: footer"></div>
    <script src="/js/temp/addTemp.js" type="application/javascript"></script>


</div>
</body>
</html>